#!/usr/python3.11/bin/python3.11

import sys
args = sys.argv

def func1():
	print("This is func1")

def func2():
	print("This is func2")

class A:
	def __init__(self, func_name):
		self.name = func_name
	
	def __getitem__(self, key):
		func_name = getattr(self, key)
		if func_name == 'func1':
			func1()
		elif func_name == 'func2':
			func2
		else:
			print("输入不合法，请重试！")
		return f"传入的函数名是{self.name}"

a = A(args[1])
print(a["name"])
